This paper proposes an improved genetic algorithm with varying population size that achieved the goal of keeping the variety of the population through adding complementary operator in adjusting population size. 文章提出的改进的变种群规模的遗传算法,在调整种群规模时通过增加补算算子,从而达到保持种群多样性的目的。